Skip to main content

All Questions

Tagged with
2votes
2answers
892views

Find all k points which are closest to origin

We have a list of points on the plane. Find the K closest points to the origin (0, 0). (Here, the distance between two points on a plane is the Euclidean distance.) You may return the ...
Mosbius8's user avatar
2votes
0answers
373views

Follow-up 1: Compare 2 unordered, rooted trees for shape-isomorphism

The previous post can be found here. In the previous post I tried to solve an exercise but found through the answer of Peilonrayz a bug in the code and 2 more while fixing it. These have now been ...
Philipp Doerner's user avatar
2votes
2answers
1kviews

Compare 2 unordered, rooted trees for shape-isomorphism

I'm currently working through "Algorithms in java" by Robert Sedgewick (3rd edition, german version) on my own and am trying to solve one of the exercises there. Edit: This question now also has a ...
Philipp Doerner's user avatar
3votes
3answers
6kviews

Sort a list of objects to put parents first

I have a class which contains a reference to a parent of the same type( or null if it has no parent). ...
Atn's user avatar
  • 141
2votes
1answer
2kviews

Treesort in Java

I have this sorting algorithm which constructs an (unbalanced) tree and performs in-order traversal in order to sort the requested range. However, the more order exists in the input array, the closer ...
coderodde's user avatar

close